Arden’s Lemma and applications
Arden’s Lemma. Given languages A,B\subseteq \Sigma^* and the equation X=AX\cup B, \tag{1}
show that
- X=A^*B is a solution of (Equation 1), that is A^*B=AA^*B\cup B;
- if L is a solution of (Equation 1) then L\supseteq A^*B;
- if \lambda\notin A then A^*B is the unique solution of (Equation 1).
Symmetric version of Arden’s Lemma. Given A,B\subseteq \Sigma^* and the equation Y=YA\cup B, \tag{2}
show that
- Y=BA^* is a solution of (Equation 2);
- if L is a solution of (Equation 2) then L\supseteq BA^*;
- if \lambda\notin A then BA^* is the unique solution of (Equation 2).
For each of the following languages L, give a DFA A_L recognizing L and two regular expressions representing L. Obtain the regular expressions using Arden’s lemma and the symmetric version of Arden’s lemma on A_L where
- L is the language of words on \{a,b\} with an even number of as;
- L is the language of words on \{a,b\} with either an even number of as or an even number of bs;
- L is the language of words on \{a,b\} ending with ababa;
- L is the language of words on \{a,b\} not containing the subword aba;
- L is the language of words on \{a,b,c\} such that between every two as there is at least one b;
- L is the language of words on \{0,1\} with at least two consecutive 0s;
- L=\overline{\{w\in \{0,1\}^*\mid \mathtt{value}_2(w)\in 3\mathbb N\}}.
TipGiven a DFA A, we can associate to each of its states q two variables: \begin{aligned} X_q&=\text{the language of the words that in $A$ bring us from $q$ to an accepting state} \\ Y_q&=\text{the language of the words that in $A$ bring us from the initial state to $q$} \end{aligned} Using the variables above, we can then set-up two systems of equations and solve them using Arden’s lemma (and its symmetric version). The system that uses the variables X_q can be resolved using Arden’s lemma, while the one using Y_q can be solved using the symmetric version of Arden’s lemma.